package com.campus.backend.vo.coupon;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 优惠券VO
 *
 * @author System
 * @since 2025-01-27
 */
@Data
@ApiModel(description = "优惠券视图对象")
public class CouponVo {

    @ApiModelProperty("优惠券ID")
    private Integer id;

    @ApiModelProperty("优惠券名称")
    private String name;

    @ApiModelProperty("类型：1-满减券，2-折扣券")
    private Integer type;

    @ApiModelProperty("面值/折扣值")
    private BigDecimal value;

    @ApiModelProperty("最低消费")
    private BigDecimal minConsume;

    @ApiModelProperty("使用开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime useStartTime;

    @ApiModelProperty("使用结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime useEndTime;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("发行量")
    private Integer total;

    @ApiModelProperty("剩余数量")
    private Integer remain;

    @ApiModelProperty("发放类型：1-自动发放，2-手动领取")
    private Integer issueType;

    @ApiModelProperty("发放条件")
    private String issueCondition;

    @ApiModelProperty("状态：1-正常，0-失效")
    private Integer status;

    @ApiModelProperty("是否已发放：true-已发放，false-未发放")
    private Boolean isIssued;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @ApiModelProperty("领取开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime receiveStartTime;

    @ApiModelProperty("领取结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime receiveEndTime;

    @ApiModelProperty("每人限领数量")
    private Integer receiveLimitNum;
}